package org.restapp;

import org.restapp.conf.HelloWorldConfiguration;
import org.restapp.resource.HelloWorldResource;
import org.restapp.resource.UserResource;

import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;

/**
 * Hello world!
 * 
 */
public class App extends Application<HelloWorldConfiguration> {
	public static void main(String[] args) {
		try {
			new App().run(args);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	// public String getName() {
	// return "hello-world";
	// }

	@Override
	public void initialize(Bootstrap<HelloWorldConfiguration> bootstrap) {
		// TODO Auto-generated method stub

	}

	@Override
	public void run(HelloWorldConfiguration configuration,
			Environment environment) throws Exception {

		environment.jersey().register(new UserResource());
		environment.jersey().register(new HelloWorldResource());
		

	}
}
